import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/generated/a.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:finance_app/src/widgets/select/mixin/radio_mixin.dart';
import 'package:flutter/material.dart';

class EmployeeRadio extends StatelessWidget with RadioMixin {
  final bool isSelect;
  final String title;
  final String content;
  final double minWidth;

  const EmployeeRadio(
      {Key key, this.isSelect, this.content, this.title, this.minWidth})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      constraints: BoxConstraints(
        minWidth: minWidth ?? getDp(110),
      ),
      alignment: Alignment.centerLeft,
      child: Row(
        mainAxisSize: MainAxisSize.min,
        children: [
          buildSelectWidget,
          SizedBox(
            width: getDp(12),
          ),
          Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisSize: MainAxisSize.min,
            children: [
              Text(
                title,
                style: TextStyle(
                  color: aceBlackColor,
                  fontSize: getSp(16),
                  fontWeight: isSelect ? FontWeight.w700 : FontWeight.w400,
                  height: 1,
                ),
              ),
              if (content?.isNotEmpty)
                SizedBox(
                  height: getDp(6),
                ),
              if (content?.isNotEmpty)
                Text(
                  content,
                  style: TextStyle(
                    color: aceBlackColor,
                    fontSize: getSp(14),
                    fontWeight: FontWeight.w400,
                    height: 1,
                  ),
                )
            ],
          )
        ],
      ),
    );
  }
}
